<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // map()方法
        // 返回一个新数组，数组中的元素为原始数组元素调用函数处理的后值.

        var arr = [1, 3, 5, 7, 9];

        let result = arr.map((value, index, array) => {
            return value * 2;
        });

        console.log(result);
        /* 
            数据类型：
                1. 单个值
                2. 数组
                3. 映射        
        */
    </script>
</body>

</html>